home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 121_01 / fseek.doc < prev    next >
Text File  |  1985-08-19  |  2KB  |  69 lines

  1.  
  2.      FSEEK (2)                 BDS C Users' Group                 FSEEK (2)
  3.  
  4.  
  5.  
  6.      NAME        NAME 
  7.           fseek - routines required by more 
  8.  
  9.      SYNOPSIS        SYNOPSIS 
  10.           fseek               fseek() 
  11.           ftell               ftell() 
  12.  
  13.      DESCRIPTION        DESCRIPTION 
  14.           _____                                                               Fseek consists of two routines: fseek and ftell.  These 
  15.           provide Unix-like facilities for character seek & positional 
  16.           query to BDS C programs.  
  17.           Fseek is called with 3 arguments: filedesc, position, and 
  18.           code.  Filedesc is the I/O buffer pointer, position is an 
  19.           int saying where we want to be, and code tells how to 
  20.           interpret position: 
  21.                0     absolute, characters
  22.                1     relative, characters
  23.                2     from end, characters
  24.                3     absolute, sectors
  25.                4     relative, sectors
  26.                5     from end, sectors
  27.           Ftell is called with one argument, the filedesc (I/O buffer 
  28.           pointer).  It returns the current position in th file.  
  29.  
  30.      CAVEATS        CAVEATS 
  31.           This program was tested with v1.50 of the BDS C compiler 
  32.           under CP/M 2.2.  It should work with other versions of BDS C 
  33.           and CP/M, but has not been tested.  
  34.  
  35.      EXAMPLES        EXAMPLES 
  36.           fseek(file,0,0)     seeks to the beginning of the file
  37.  
  38.      BUGS        BUGS 
  39.           Codes 2 and 5 for fseek are not implemented although they 
  40.           exist in Unix V6.  The routine returns ERROR if called with 
  41.           code 2 or 5.  
  42.  
  43.      NOTES        NOTES 
  44.           Used in more.c.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.                                       -1-
  66.  
  67.      0     absolute, characters
  68.                1     relative, characters
  69.